<?php
class ItemQuickBuyAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT
    );

    /**
     * Quick buy item
     *
     * @param int $userId
     * @param int $itemDefId
     * @param int $count
     * @param int $reasonId
     * @return SzResponse
     */
    public function execute($userId, $itemDefId, $count, $reasonId)
    {
        return $this->buildResponse(
            ItemService::get()->quickBuy($userId, $itemDefId, $count, $reasonId)
        );
    }
}